package com.hpeng.sys.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;

import com.hpeng.sys.dao.DepartmentsDao;
import com.hpeng.sys.dao.StaDao;
import com.hpeng.sys.model.Staff;
import com.hpeng.sys.service.StaMgr;

@Component("staMgr")
public class StaMgrImpl implements StaMgr{

	public List<Staff> getStaffByName(String staffname){
		return staDao.getStaffByName(staffname);
	}
	public List<Staff> findStaff(){
		return staDao.findStaff();
	}

	public List<Staff> staffBydepid(String depid){
		System.out.println(depid);
		List<Staff> staffs = staDao.getStaffBydepid(depid);
		System.out.println(staffs.size());
		return staffs;
}
	public Staff getById(String id){
		return staDao.getById(id);
	}
	@Resource
	private DepartmentsDao departmentsDao;
	@Resource
	private StaDao staDao;
}